﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Category.aspx.cs" Inherits="Category"
    MasterPageFile="~/Template.master" Culture="auto" meta:resourcekey="PageResource1"
    EnableViewState="false" UICulture="auto" %>

<%@ Register Src="Controls/CategoryList.ascx" TagName="CategoryList" TagPrefix="uc1" %>
<%@ Register Src="Controls/PageContentHeader.ascx" TagName="PageContentHeader" TagPrefix="uc2" %>
<%@ Register Src="Controls/ProductListVertical.ascx" TagName="ProductListVertical"
    TagPrefix="uc3" %>
<asp:Content EnableViewState="false" ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <asp:ScriptManager EnablePageMethods="True" ID="ScriptManager1" runat="server" ScriptMode="Release">
        <Services>
            <asp:ServiceReference Path="~/WebServices/ShoppingCartService.svc" />
            <asp:ServiceReference Path="~/WebServices/ProductService.svc" />
        </Services>
        <Scripts>
            <asp:ScriptReference Path="~/Scripts/GeneralScripts.js" />
        </Scripts>
    </asp:ScriptManager>
    <uc2:PageContentHeader ID="PageContentHeader1" runat="server" />
    <uc1:CategoryList ID="CategoryList1" runat="server" />
    <uc3:ProductListVertical ID="ProductListVertical1" runat="server" />
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="head">
<script type="text/javascript">
function onSucceed(result)
    {
        ShoppingCartSubtotal.innerHTML = result.SubTotal;
        ShoppingCartCount.innerHTML = result.Count;
        alert(String.format("{0}.\n{1}: {2};\n{3}: {4}", '<%= Resources.JSMessages.AddToCartSucces %>', '<%= Resources.JSMessages.CartCountState %>', result.Count, '<%= Resources.JSMessages.CartSubtotalState %>', result.SubTotal));
    }
    function onFailed()
    {
        alert("Failed");
    }
    function ChangeFeatured_onSucceed(result)
    {
        
    }
    function ChangeFeatured_onFailed()
    {
        alert("Failed");
    }
    function GetHtmlEditor(controlId)
    {
        return $find(controlId);
    }
</script>
</asp:Content>
